<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('AI模型训练分类列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <!--                                <label>分类ID：</label>-->
                                <!--                                <input type="text" name="classifyId"/>-->
                                <!--                            </li>-->
                            <li>
                                <label>模型名称：</label>
                                <!--                                <input type="text" name="modelName"/>-->
                                <select name="modelId">
                                    <option value="" th:placeholder="--请选择模型名称--">--请选择模型名称--</option>
                                    <option value="1">安全帽</option>
                                    <option value="2">人</option>
                                    <option value="3">可疑车辆</option>
                                    <option value="4">主煤流检测</option>
                                </select>
                            </li>
                            <li>
                                <!--                                <label>模型ID：</label>-->
                                <!--                                <input type="text" name="modelId"/>-->
                                <!--                            </li>-->
                                <!--                            <li>-->
                                <!--                                <label>训练名称：</label>-->
                                <!--                                <input type="text" name="classifyNo"/>-->
                                <!--                            </li>-->
                            <li>
                                <label>模型类别：</label>
                                <!--                                <input type="text" name="modelCategory"/>-->
                                <select name="modelId">
                                    <option value="" th:placeholder="--请选择模型类别--">--请选择模型类别--</option>
                                    <option value="1">目标检测</option>
                                    <option value="2">图片分类</option>

                                </select>
                            </li>
                            <!--                            <li>-->
                            <!--                                <label>版本号：</label>-->
                            <!--                                <input type="text" name="version"/>-->
                            <!--                            </li>-->
                            <!--                            <li>-->
                            <!--                                <label>训练时间：</label>-->
                            <!--                                <input type="text" class="time-input" placeholder="请选择训练时间" name="classifyTime"/>-->
                            <!--                            </li>-->
                            <!--                            <li>-->
                            <!--                                <label>训练进度：</label>-->
                            <!--                                <input type="text" name="trainingProgress"/>-->
                            <!--                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="AI:ClassifyService:add">
                    <i class="fa fa-plus"></i> 添加训练模型
                </a>
<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="AI:ClassifyService:edit">-->
<!--                    <i class="fa fa-edit"></i> 修改-->
<!--                </a>-->
<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="AI:ClassifyService:remove">-->
<!--                    <i class="fa fa-remove"></i> 删除-->
<!--                </a>-->
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="AI:ClassifyService:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                </a>-->
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('AI:ClassifyService:edit')}]];
        var removeFlag = [[${@permission.hasPermi('AI:ClassifyService:remove')}]];
        var prefix = ctx + "AI/ClassifyService";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "AI模型训练分类",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'classifyUuid',
                    title: '闁告帒妫涚悮鐛籇',
                    visible: false
                },
                {
                    field: 'classifyId',
                    title: '分类ID'
                },
                {
                    field: 'modelName',
                    title: '模型名称'
                },
                {
                    field: 'modelId',
                    title: '模型ID'
                },
                {
                    field: 'classifyNo',
                    title: '训练名称'
                },
                {
                    field: 'modelCategory',
                    title: '模型类别'
                },
                {
                    field: 'version',
                    title: '版本号'
                },
                {
                    field: 'classifyTime',
                    title: '训练时间'
                },
                {
                    field: 'trainingStatus',
                    title: '训练进度'
                },
                {
                    field: 'trainingProgress',
                    title: '训练进度'
                },
                {
                    field: 'trainingAccuracy',
                    title: '训练准确度'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.classifyUuid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.classifyUuid + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>